{
  "cells": [
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "YiPIh4QSYBCW"
      },
      "source": [
        "# 🤖 GitHub Repo Analyzer Agent\n",
        "AI agent powered by PraisonAI and OpenAI to analyze GitHub repositories using GitHub API."
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "2Jkig4AGZG1n"
      },
      "source": [
        "[![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/DhivyaBharathy-web/PraisonAI/blob/main/examples/cookbooks/github_repo_analyzer_agent.ipynb)"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "aAiN-i3UYvsN"
      },
      "source": [
        "# 📦 Install dependencies"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "1B_sEv9PYBCZ"
      },
      "outputs": [],
      "source": [
        "!pip install praisonaiagents openai requests"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "eUViHgGPaObo"
      },
      "source": [
        "# Tools Used"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "ut_APj9xaSQI"
      },
      "source": [
        "🧠 praisonaiagents – Smart AI agent\n",
        "\n",
        "🔗 openai – GPT-powered responses\n",
        "\n",
        "📂 requests – GitHub repo analysis\n",
        "\n",
        "🖥️ Python I/O – Interactive CLI in notebook"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "hDsXrWYpYzuB"
      },
      "source": [
        "# 🔐 Set OpenAI API Key"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "aea6TQ4hYBCb"
      },
      "outputs": [],
      "source": [
        "import os\n",
        "if not os.getenv(\"OPENAI_API_KEY\"):\n",
        "    os.environ[\"OPENAI_API_KEY\"] = input(\"🔐 Enter your OpenAI API key: \")"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "OvQvZZonY2YI"
      },
      "source": [
        "# 🧠 Imports"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "1XSubvMsYBCc"
      },
      "outputs": [],
      "source": [
        "import requests\n",
        "import openai\n",
        "from praisonaiagents import Agent\n",
        "\n",
        "openai.api_key = os.environ[\"OPENAI_API_KEY\"]"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "s0o_V2oqY4rJ"
      },
      "source": [
        "# 🤖 Create the Agent"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "40KpW78vYBCc"
      },
      "outputs": [],
      "source": [
        "agent = Agent(instructions=\"\"\"\n",
        "You are a GitHub codebase explainer. When given a repo URL, fetch summary of\n",
        "its files and provide insightful analysis. Be helpful and concise.\n",
        "\"\"\")"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "q4b3ts3lY-Fe"
      },
      "source": [
        "# 📂 Fetch GitHub repo file names"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "8fWBzdRxYBCd"
      },
      "outputs": [],
      "source": [
        "def fetch_repo_files(repo_url):\n",
        "    api_url = repo_url.replace(\"https://github.com\", \"https://api.github.com/repos\") + \"/contents\"\n",
        "    r = requests.get(api_url)\n",
        "    return [f[\"name\"] for f in r.json()] if r.status_code == 200 else []"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "de0Du9OsZAjo"
      },
      "source": [
        "# 💬 Ask Agent"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "v85t6c8PYBCd"
      },
      "outputs": [],
      "source": [
        "def ask_agent(repo_url):\n",
        "    files = fetch_repo_files(repo_url)\n",
        "    if not files:\n",
        "        return \"❌ Cannot fetch repo contents.\"\n",
        "    return agent.start(f\"Repo contains files: {files}. Analyze key components and structure.\")"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "8HOy15H0ZCsZ"
      },
      "source": [
        "# 🧪 Run the agent"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 1000,
          "referenced_widgets": [
            "c536cd3c498244d4b0c2526b00610f29",
            "f0baa19f760c4a869064e51fde0ea4d0"
          ]
        },
        "id": "QNmR8_ZdYBCd",
        "outputId": "448195d1-28eb-43c1-e86c-5308c4e6d089"
      },
      "outputs": [
        {
          "name": "stdout",
          "output_type": "stream",
          "text": [
            "🔗 Enter GitHub repository URL: https://github.com/DhivyaBharathy-web/agents\n"
          ]
        },
        {
          "data": {
            "text/html": [
              "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"color: #d2e3c8; text-decoration-color: #d2e3c8\">╭─ </span><span style=\"color: #d2e3c8; text-decoration-color: #d2e3c8; font-weight: bold\">Agent Info</span><span style=\"color: #d2e3c8; text-decoration-color: #d2e3c8\"> ────────────────────────────────────────────────────────────────────────────────────────────────────╮</span>\n",
              "<span style=\"color: #d2e3c8; text-decoration-color: #d2e3c8\">│</span>                                                                                                                 <span style=\"color: #d2e3c8; text-decoration-color: #d2e3c8\">│</span>\n",
              "<span style=\"color: #d2e3c8; text-decoration-color: #d2e3c8\">│</span>  <span style=\"color: #ff9b9b; text-decoration-color: #ff9b9b; font-weight: bold\">👤 Agent:</span> <span style=\"color: #ffe5e5; text-decoration-color: #ffe5e5\">Agent</span>                                                                                                <span style=\"color: #d2e3c8; text-decoration-color: #d2e3c8\">│</span>\n",
              "<span style=\"color: #d2e3c8; text-decoration-color: #d2e3c8\">│</span>  <span style=\"color: #b4b4b3; text-decoration-color: #b4b4b3; font-weight: bold\">Role:</span> <span style=\"color: #ffe5e5; text-decoration-color: #ffe5e5\">Assistant</span>                                                                                                <span style=\"color: #d2e3c8; text-decoration-color: #d2e3c8\">│</span>\n",
              "<span style=\"color: #d2e3c8; text-decoration-color: #d2e3c8\">│</span>                                                                                                                 <span style=\"color: #d2e3c8; text-decoration-color: #d2e3c8\">│</span>\n",
              "<span style=\"color: #d2e3c8; text-decoration-color: #d2e3c8\">╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯</span>\n",
              "</pre>\n"
            ],
            "text/plain": [
              "\u001b[38;2;210;227;200m╭─\u001b[0m\u001b[38;2;210;227;200m \u001b[0m\u001b[1;38;2;210;227;200mAgent Info\u001b[0m\u001b[38;2;210;227;200m \u001b[0m\u001b[38;2;210;227;200m───────────────────────────────────────────────────────────────────────────────────────────────────\u001b[0m\u001b[38;2;210;227;200m─╮\u001b[0m\n",
              "\u001b[38;2;210;227;200m│\u001b[0m                                                                                                                 \u001b[38;2;210;227;200m│\u001b[0m\n",
              "\u001b[38;2;210;227;200m│\u001b[0m  \u001b[1;38;2;255;155;155m👤 Agent:\u001b[0m \u001b[38;2;255;229;229mAgent\u001b[0m                                                                                                \u001b[38;2;210;227;200m│\u001b[0m\n",
              "\u001b[38;2;210;227;200m│\u001b[0m  \u001b[1;38;2;180;180;179mRole:\u001b[0m \u001b[38;2;255;229;229mAssistant\u001b[0m                                                                                                \u001b[38;2;210;227;200m│\u001b[0m\n",
              "\u001b[38;2;210;227;200m│\u001b[0m                                                                                                                 \u001b[38;2;210;227;200m│\u001b[0m\n",
              "\u001b[38;2;210;227;200m╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯\u001b[0m\n"
            ]
          },
          "metadata": {},
          "output_type": "display_data"
        },
        {
          "data": {
            "application/vnd.jupyter.widget-view+json": {
              "model_id": "c536cd3c498244d4b0c2526b00610f29",
              "version_major": 2,
              "version_minor": 0
            },
            "text/plain": [
              "Output()"
            ]
          },
          "metadata": {},
          "output_type": "display_data"
        },
        {
          "data": {
            "text/html": [
              "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"></pre>\n"
            ],
            "text/plain": []
          },
          "metadata": {},
          "output_type": "display_data"
        },
        {
          "data": {
            "text/html": [
              "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\">\n",
              "</pre>\n"
            ],
            "text/plain": [
              "\n"
            ]
          },
          "metadata": {},
          "output_type": "display_data"
        },
        {
          "data": {
            "text/html": [
              "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">Response generated in 10.0s</span>\n",
              "</pre>\n"
            ],
            "text/plain": [
              "\u001b[2mResponse generated in 10.0s\u001b[0m\n"
            ]
          },
          "metadata": {},
          "output_type": "display_data"
        },
        {
          "data": {
            "text/html": [
              "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"color: #008080; text-decoration-color: #008080\">╭───────────────────────────────────────────────────── Task ──────────────────────────────────────────────────────╮</span>\n",
              "<span style=\"color: #008080; text-decoration-color: #008080\">│</span> Repo contains files: ['Fuel_Emission_Agent_Intelligence_Agent.ipynb',                                           <span style=\"color: #008080; text-decoration-color: #008080\">│</span>\n",
              "<span style=\"color: #008080; text-decoration-color: #008080\">│</span> 'fixed_Cognitive_Assistant_Agent_Team.ipynb', 'fixed_Crypto_Research_Agent_Intelligence_Agent.ipynb',           <span style=\"color: #008080; text-decoration-color: #008080\">│</span>\n",
              "<span style=\"color: #008080; text-decoration-color: #008080\">│</span> 'fixed_E_commerce_Shopping_Assistant.ipynb', 'fixed_Home_Buying_Real_Estate_Agent.ipynb',                       <span style=\"color: #008080; text-decoration-color: #008080\">│</span>\n",
              "<span style=\"color: #008080; text-decoration-color: #008080\">│</span> 'fixed_YouTube_Influencer_Intelligence_Agent.ipynb', 'fixed_voiGno_Restaurant_Agent_PraisonAI.ipynb']. Analyze  <span style=\"color: #008080; text-decoration-color: #008080\">│</span>\n",
              "<span style=\"color: #008080; text-decoration-color: #008080\">│</span> key components and structure.                                                                                   <span style=\"color: #008080; text-decoration-color: #008080\">│</span>\n",
              "<span style=\"color: #008080; text-decoration-color: #008080\">╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯</span>\n",
              "</pre>\n"
            ],
            "text/plain": [
              "\u001b[36m╭─\u001b[0m\u001b[36m────────────────────────────────────────────────────\u001b[0m\u001b[36m Task \u001b[0m\u001b[36m─────────────────────────────────────────────────────\u001b[0m\u001b[36m─╮\u001b[0m\n",
              "\u001b[36m│\u001b[0m Repo contains files: ['Fuel_Emission_Agent_Intelligence_Agent.ipynb',                                           \u001b[36m│\u001b[0m\n",
              "\u001b[36m│\u001b[0m 'fixed_Cognitive_Assistant_Agent_Team.ipynb', 'fixed_Crypto_Research_Agent_Intelligence_Agent.ipynb',           \u001b[36m│\u001b[0m\n",
              "\u001b[36m│\u001b[0m 'fixed_E_commerce_Shopping_Assistant.ipynb', 'fixed_Home_Buying_Real_Estate_Agent.ipynb',                       \u001b[36m│\u001b[0m\n",
              "\u001b[36m│\u001b[0m 'fixed_YouTube_Influencer_Intelligence_Agent.ipynb', 'fixed_voiGno_Restaurant_Agent_PraisonAI.ipynb']. Analyze  \u001b[36m│\u001b[0m\n",
              "\u001b[36m│\u001b[0m key components and structure.                                                                                   \u001b[36m│\u001b[0m\n",
              "\u001b[36m╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯\u001b[0m\n"
            ]
          },
          "metadata": {},
          "output_type": "display_data"
        },
        {
          "data": {
            "text/html": [
              "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"color: #008080; text-decoration-color: #008080\">╭─────────────────────────────────────────────────── Response ────────────────────────────────────────────────────╮</span>\n",
              "<span style=\"color: #008080; text-decoration-color: #008080\">│</span> The repository contains several Jupyter Notebook files, each seemingly focused on different specialized agents. <span style=\"color: #008080; text-decoration-color: #008080\">│</span>\n",
              "<span style=\"color: #008080; text-decoration-color: #008080\">│</span> Here's a breakdown of the key components and structure based on the file names:                                 <span style=\"color: #008080; text-decoration-color: #008080\">│</span>\n",
              "<span style=\"color: #008080; text-decoration-color: #008080\">│</span>                                                                                                                 <span style=\"color: #008080; text-decoration-color: #008080\">│</span>\n",
              "<span style=\"color: #008080; text-decoration-color: #008080\">│</span> <span style=\"color: #808000; text-decoration-color: #808000; font-weight: bold\"> 1 </span><span style=\"font-weight: bold\">Fuel_Emission_Agent_Intelligence_Agent.ipynb</span>:                                                                <span style=\"color: #008080; text-decoration-color: #008080\">│</span>\n",
              "<span style=\"color: #008080; text-decoration-color: #008080\">│</span> <span style=\"color: #808000; text-decoration-color: #808000; font-weight: bold\">    • </span>This notebook likely focuses on analyzing and possibly predicting fuel emissions. It might include data   <span style=\"color: #008080; text-decoration-color: #008080\">│</span>\n",
              "<span style=\"color: #008080; text-decoration-color: #008080\">│</span> <span style=\"color: #808000; text-decoration-color: #808000; font-weight: bold\">      </span>analysis, machine learning models, or simulations to assess environmental impacts or optimize fuel usage. <span style=\"color: #008080; text-decoration-color: #008080\">│</span>\n",
              "<span style=\"color: #008080; text-decoration-color: #008080\">│</span> <span style=\"color: #808000; text-decoration-color: #808000; font-weight: bold\"> 2 </span><span style=\"font-weight: bold\">fixed_Cognitive_Assistant_Agent_Team.ipynb</span>:                                                                  <span style=\"color: #008080; text-decoration-color: #008080\">│</span>\n",
              "<span style=\"color: #008080; text-decoration-color: #008080\">│</span> <span style=\"color: #808000; text-decoration-color: #808000; font-weight: bold\">    • </span>This file suggests a cognitive assistant, possibly designed to aid in decision-making or provide          <span style=\"color: #008080; text-decoration-color: #008080\">│</span>\n",
              "<span style=\"color: #008080; text-decoration-color: #008080\">│</span> <span style=\"color: #808000; text-decoration-color: #808000; font-weight: bold\">      </span>intelligent recommendations. The \"Team\" aspect might indicate collaborative features or multi-agent       <span style=\"color: #008080; text-decoration-color: #008080\">│</span>\n",
              "<span style=\"color: #008080; text-decoration-color: #008080\">│</span> <span style=\"color: #808000; text-decoration-color: #808000; font-weight: bold\">      </span>interactions.                                                                                             <span style=\"color: #008080; text-decoration-color: #008080\">│</span>\n",
              "<span style=\"color: #008080; text-decoration-color: #008080\">│</span> <span style=\"color: #808000; text-decoration-color: #808000; font-weight: bold\"> 3 </span><span style=\"font-weight: bold\">fixed_Crypto_Research_Agent_Intelligence_Agent.ipynb</span>:                                                        <span style=\"color: #008080; text-decoration-color: #008080\">│</span>\n",
              "<span style=\"color: #008080; text-decoration-color: #008080\">│</span> <span style=\"color: #808000; text-decoration-color: #808000; font-weight: bold\">    • </span>This notebook is probably dedicated to cryptocurrency research. It might include data analysis, market    <span style=\"color: #008080; text-decoration-color: #008080\">│</span>\n",
              "<span style=\"color: #008080; text-decoration-color: #008080\">│</span> <span style=\"color: #808000; text-decoration-color: #808000; font-weight: bold\">      </span>trend predictions, or sentiment analysis related to cryptocurrencies.                                     <span style=\"color: #008080; text-decoration-color: #008080\">│</span>\n",
              "<span style=\"color: #008080; text-decoration-color: #008080\">│</span> <span style=\"color: #808000; text-decoration-color: #808000; font-weight: bold\"> 4 </span><span style=\"font-weight: bold\">fixed_E_commerce_Shopping_Assistant.ipynb</span>:                                                                   <span style=\"color: #008080; text-decoration-color: #008080\">│</span>\n",
              "<span style=\"color: #008080; text-decoration-color: #008080\">│</span> <span style=\"color: #808000; text-decoration-color: #808000; font-weight: bold\">    • </span>This agent likely serves as a shopping assistant, possibly providing product recommendations, price       <span style=\"color: #008080; text-decoration-color: #008080\">│</span>\n",
              "<span style=\"color: #008080; text-decoration-color: #008080\">│</span> <span style=\"color: #808000; text-decoration-color: #808000; font-weight: bold\">      </span>comparisons, or personalized shopping experiences for e-commerce platforms.                               <span style=\"color: #008080; text-decoration-color: #008080\">│</span>\n",
              "<span style=\"color: #008080; text-decoration-color: #008080\">│</span> <span style=\"color: #808000; text-decoration-color: #808000; font-weight: bold\"> 5 </span><span style=\"font-weight: bold\">fixed_Home_Buying_Real_Estate_Agent.ipynb</span>:                                                                   <span style=\"color: #008080; text-decoration-color: #008080\">│</span>\n",
              "<span style=\"color: #008080; text-decoration-color: #008080\">│</span> <span style=\"color: #808000; text-decoration-color: #808000; font-weight: bold\">    • </span>This notebook appears to be focused on the real estate market, potentially offering insights into         <span style=\"color: #008080; text-decoration-color: #008080\">│</span>\n",
              "<span style=\"color: #008080; text-decoration-color: #008080\">│</span> <span style=\"color: #808000; text-decoration-color: #808000; font-weight: bold\">      </span>property values, market trends, or personalized home-buying recommendations.                              <span style=\"color: #008080; text-decoration-color: #008080\">│</span>\n",
              "<span style=\"color: #008080; text-decoration-color: #008080\">│</span> <span style=\"color: #808000; text-decoration-color: #808000; font-weight: bold\"> 6 </span><span style=\"font-weight: bold\">fixed_YouTube_Influencer_Intelligence_Agent.ipynb</span>:                                                           <span style=\"color: #008080; text-decoration-color: #008080\">│</span>\n",
              "<span style=\"color: #008080; text-decoration-color: #008080\">│</span> <span style=\"color: #808000; text-decoration-color: #808000; font-weight: bold\">    • </span>This file likely deals with analyzing YouTube influencers, possibly providing insights into influencer    <span style=\"color: #008080; text-decoration-color: #008080\">│</span>\n",
              "<span style=\"color: #008080; text-decoration-color: #008080\">│</span> <span style=\"color: #808000; text-decoration-color: #808000; font-weight: bold\">      </span>performance, audience engagement, or content optimization strategies.                                     <span style=\"color: #008080; text-decoration-color: #008080\">│</span>\n",
              "<span style=\"color: #008080; text-decoration-color: #008080\">│</span> <span style=\"color: #808000; text-decoration-color: #808000; font-weight: bold\"> 7 </span><span style=\"font-weight: bold\">fixed_voiGno_Restaurant_Agent_PraisonAI.ipynb</span>:                                                               <span style=\"color: #008080; text-decoration-color: #008080\">│</span>\n",
              "<span style=\"color: #008080; text-decoration-color: #008080\">│</span> <span style=\"color: #808000; text-decoration-color: #808000; font-weight: bold\">    • </span>This agent seems to be related to the restaurant industry, possibly offering services like menu           <span style=\"color: #008080; text-decoration-color: #008080\">│</span>\n",
              "<span style=\"color: #008080; text-decoration-color: #008080\">│</span> <span style=\"color: #808000; text-decoration-color: #808000; font-weight: bold\">      </span>optimization, customer feedback analysis, or operational efficiency improvements.                         <span style=\"color: #008080; text-decoration-color: #008080\">│</span>\n",
              "<span style=\"color: #008080; text-decoration-color: #008080\">│</span>                                                                                                                 <span style=\"color: #008080; text-decoration-color: #008080\">│</span>\n",
              "<span style=\"color: #008080; text-decoration-color: #008080\">│</span> <span style=\"font-weight: bold\">Overall Structure and Insights</span>:                                                                                 <span style=\"color: #008080; text-decoration-color: #008080\">│</span>\n",
              "<span style=\"color: #008080; text-decoration-color: #008080\">│</span>                                                                                                                 <span style=\"color: #008080; text-decoration-color: #008080\">│</span>\n",
              "<span style=\"color: #008080; text-decoration-color: #008080\">│</span> <span style=\"color: #808000; text-decoration-color: #808000; font-weight: bold\"> • </span>The repository appears to focus on developing intelligent agents across various domains, each tailored to    <span style=\"color: #008080; text-decoration-color: #008080\">│</span>\n",
              "<span style=\"color: #008080; text-decoration-color: #008080\">│</span> <span style=\"color: #808000; text-decoration-color: #808000; font-weight: bold\">   </span>specific industry needs.                                                                                     <span style=\"color: #008080; text-decoration-color: #008080\">│</span>\n",
              "<span style=\"color: #008080; text-decoration-color: #008080\">│</span> <span style=\"color: #808000; text-decoration-color: #808000; font-weight: bold\"> • </span>The use of Jupyter Notebooks suggests an emphasis on data analysis, visualization, and possibly machine      <span style=\"color: #008080; text-decoration-color: #008080\">│</span>\n",
              "<span style=\"color: #008080; text-decoration-color: #008080\">│</span> <span style=\"color: #808000; text-decoration-color: #808000; font-weight: bold\">   </span>learning or AI model development.                                                                            <span style=\"color: #008080; text-decoration-color: #008080\">│</span>\n",
              "<span style=\"color: #008080; text-decoration-color: #008080\">│</span> <span style=\"color: #808000; text-decoration-color: #808000; font-weight: bold\"> • </span>The prefix \"fixed_\" in the file names might indicate that these are refined or updated versions of previous  <span style=\"color: #008080; text-decoration-color: #008080\">│</span>\n",
              "<span style=\"color: #008080; text-decoration-color: #008080\">│</span> <span style=\"color: #808000; text-decoration-color: #808000; font-weight: bold\">   </span>iterations.                                                                                                  <span style=\"color: #008080; text-decoration-color: #008080\">│</span>\n",
              "<span style=\"color: #008080; text-decoration-color: #008080\">│</span> <span style=\"color: #808000; text-decoration-color: #808000; font-weight: bold\"> • </span>The diversity of domains covered (environmental, cognitive, financial, e-commerce, real estate, social       <span style=\"color: #008080; text-decoration-color: #008080\">│</span>\n",
              "<span style=\"color: #008080; text-decoration-color: #008080\">│</span> <span style=\"color: #808000; text-decoration-color: #808000; font-weight: bold\">   </span>media, and hospitality) suggests a broad application of AI and data-driven insights.                         <span style=\"color: #008080; text-decoration-color: #008080\">│</span>\n",
              "<span style=\"color: #008080; text-decoration-color: #008080\">│</span>                                                                                                                 <span style=\"color: #008080; text-decoration-color: #008080\">│</span>\n",
              "<span style=\"color: #008080; text-decoration-color: #008080\">│</span> These notebooks likely contain a mix of data preprocessing, model training, and evaluation, along with          <span style=\"color: #008080; text-decoration-color: #008080\">│</span>\n",
              "<span style=\"color: #008080; text-decoration-color: #008080\">│</span> visualizations to support the findings and recommendations of each agent.                                       <span style=\"color: #008080; text-decoration-color: #008080\">│</span>\n",
              "<span style=\"color: #008080; text-decoration-color: #008080\">╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯</span>\n",
              "</pre>\n"
            ],
            "text/plain": [
              "\u001b[36m╭─\u001b[0m\u001b[36m──────────────────────────────────────────────────\u001b[0m\u001b[36m Response \u001b[0m\u001b[36m───────────────────────────────────────────────────\u001b[0m\u001b[36m─╮\u001b[0m\n",
              "\u001b[36m│\u001b[0m The repository contains several Jupyter Notebook files, each seemingly focused on different specialized agents. \u001b[36m│\u001b[0m\n",
              "\u001b[36m│\u001b[0m Here's a breakdown of the key components and structure based on the file names:                                 \u001b[36m│\u001b[0m\n",
              "\u001b[36m│\u001b[0m                                                                                                                 \u001b[36m│\u001b[0m\n",
              "\u001b[36m│\u001b[0m \u001b[1;33m 1 \u001b[0m\u001b[1mFuel_Emission_Agent_Intelligence_Agent.ipynb\u001b[0m:                                                                \u001b[36m│\u001b[0m\n",
              "\u001b[36m│\u001b[0m \u001b[1;33m   \u001b[0m\u001b[1;33m • \u001b[0mThis notebook likely focuses on analyzing and possibly predicting fuel emissions. It might include data   \u001b[36m│\u001b[0m\n",
              "\u001b[36m│\u001b[0m \u001b[1;33m   \u001b[0m\u001b[1;33m   \u001b[0manalysis, machine learning models, or simulations to assess environmental impacts or optimize fuel usage. \u001b[36m│\u001b[0m\n",
              "\u001b[36m│\u001b[0m \u001b[1;33m 2 \u001b[0m\u001b[1mfixed_Cognitive_Assistant_Agent_Team.ipynb\u001b[0m:                                                                  \u001b[36m│\u001b[0m\n",
              "\u001b[36m│\u001b[0m \u001b[1;33m   \u001b[0m\u001b[1;33m • \u001b[0mThis file suggests a cognitive assistant, possibly designed to aid in decision-making or provide          \u001b[36m│\u001b[0m\n",
              "\u001b[36m│\u001b[0m \u001b[1;33m   \u001b[0m\u001b[1;33m   \u001b[0mintelligent recommendations. The \"Team\" aspect might indicate collaborative features or multi-agent       \u001b[36m│\u001b[0m\n",
              "\u001b[36m│\u001b[0m \u001b[1;33m   \u001b[0m\u001b[1;33m   \u001b[0minteractions.                                                                                             \u001b[36m│\u001b[0m\n",
              "\u001b[36m│\u001b[0m \u001b[1;33m 3 \u001b[0m\u001b[1mfixed_Crypto_Research_Agent_Intelligence_Agent.ipynb\u001b[0m:                                                        \u001b[36m│\u001b[0m\n",
              "\u001b[36m│\u001b[0m \u001b[1;33m   \u001b[0m\u001b[1;33m • \u001b[0mThis notebook is probably dedicated to cryptocurrency research. It might include data analysis, market    \u001b[36m│\u001b[0m\n",
              "\u001b[36m│\u001b[0m \u001b[1;33m   \u001b[0m\u001b[1;33m   \u001b[0mtrend predictions, or sentiment analysis related to cryptocurrencies.                                     \u001b[36m│\u001b[0m\n",
              "\u001b[36m│\u001b[0m \u001b[1;33m 4 \u001b[0m\u001b[1mfixed_E_commerce_Shopping_Assistant.ipynb\u001b[0m:                                                                   \u001b[36m│\u001b[0m\n",
              "\u001b[36m│\u001b[0m \u001b[1;33m   \u001b[0m\u001b[1;33m • \u001b[0mThis agent likely serves as a shopping assistant, possibly providing product recommendations, price       \u001b[36m│\u001b[0m\n",
              "\u001b[36m│\u001b[0m \u001b[1;33m   \u001b[0m\u001b[1;33m   \u001b[0mcomparisons, or personalized shopping experiences for e-commerce platforms.                               \u001b[36m│\u001b[0m\n",
              "\u001b[36m│\u001b[0m \u001b[1;33m 5 \u001b[0m\u001b[1mfixed_Home_Buying_Real_Estate_Agent.ipynb\u001b[0m:                                                                   \u001b[36m│\u001b[0m\n",
              "\u001b[36m│\u001b[0m \u001b[1;33m   \u001b[0m\u001b[1;33m • \u001b[0mThis notebook appears to be focused on the real estate market, potentially offering insights into         \u001b[36m│\u001b[0m\n",
              "\u001b[36m│\u001b[0m \u001b[1;33m   \u001b[0m\u001b[1;33m   \u001b[0mproperty values, market trends, or personalized home-buying recommendations.                              \u001b[36m│\u001b[0m\n",
              "\u001b[36m│\u001b[0m \u001b[1;33m 6 \u001b[0m\u001b[1mfixed_YouTube_Influencer_Intelligence_Agent.ipynb\u001b[0m:                                                           \u001b[36m│\u001b[0m\n",
              "\u001b[36m│\u001b[0m \u001b[1;33m   \u001b[0m\u001b[1;33m • \u001b[0mThis file likely deals with analyzing YouTube influencers, possibly providing insights into influencer    \u001b[36m│\u001b[0m\n",
              "\u001b[36m│\u001b[0m \u001b[1;33m   \u001b[0m\u001b[1;33m   \u001b[0mperformance, audience engagement, or content optimization strategies.                                     \u001b[36m│\u001b[0m\n",
              "\u001b[36m│\u001b[0m \u001b[1;33m 7 \u001b[0m\u001b[1mfixed_voiGno_Restaurant_Agent_PraisonAI.ipynb\u001b[0m:                                                               \u001b[36m│\u001b[0m\n",
              "\u001b[36m│\u001b[0m \u001b[1;33m   \u001b[0m\u001b[1;33m • \u001b[0mThis agent seems to be related to the restaurant industry, possibly offering services like menu           \u001b[36m│\u001b[0m\n",
              "\u001b[36m│\u001b[0m \u001b[1;33m   \u001b[0m\u001b[1;33m   \u001b[0moptimization, customer feedback analysis, or operational efficiency improvements.                         \u001b[36m│\u001b[0m\n",
              "\u001b[36m│\u001b[0m                                                                                                                 \u001b[36m│\u001b[0m\n",
              "\u001b[36m│\u001b[0m \u001b[1mOverall Structure and Insights\u001b[0m:                                                                                 \u001b[36m│\u001b[0m\n",
              "\u001b[36m│\u001b[0m                                                                                                                 \u001b[36m│\u001b[0m\n",
              "\u001b[36m│\u001b[0m \u001b[1;33m • \u001b[0mThe repository appears to focus on developing intelligent agents across various domains, each tailored to    \u001b[36m│\u001b[0m\n",
              "\u001b[36m│\u001b[0m \u001b[1;33m   \u001b[0mspecific industry needs.                                                                                     \u001b[36m│\u001b[0m\n",
              "\u001b[36m│\u001b[0m \u001b[1;33m • \u001b[0mThe use of Jupyter Notebooks suggests an emphasis on data analysis, visualization, and possibly machine      \u001b[36m│\u001b[0m\n",
              "\u001b[36m│\u001b[0m \u001b[1;33m   \u001b[0mlearning or AI model development.                                                                            \u001b[36m│\u001b[0m\n",
              "\u001b[36m│\u001b[0m \u001b[1;33m • \u001b[0mThe prefix \"fixed_\" in the file names might indicate that these are refined or updated versions of previous  \u001b[36m│\u001b[0m\n",
              "\u001b[36m│\u001b[0m \u001b[1;33m   \u001b[0miterations.                                                                                                  \u001b[36m│\u001b[0m\n",
              "\u001b[36m│\u001b[0m \u001b[1;33m • \u001b[0mThe diversity of domains covered (environmental, cognitive, financial, e-commerce, real estate, social       \u001b[36m│\u001b[0m\n",
              "\u001b[36m│\u001b[0m \u001b[1;33m   \u001b[0mmedia, and hospitality) suggests a broad application of AI and data-driven insights.                         \u001b[36m│\u001b[0m\n",
              "\u001b[36m│\u001b[0m                                                                                                                 \u001b[36m│\u001b[0m\n",
              "\u001b[36m│\u001b[0m These notebooks likely contain a mix of data preprocessing, model training, and evaluation, along with          \u001b[36m│\u001b[0m\n",
              "\u001b[36m│\u001b[0m visualizations to support the findings and recommendations of each agent.                                       \u001b[36m│\u001b[0m\n",
              "\u001b[36m╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯\u001b[0m\n"
            ]
          },
          "metadata": {},
          "output_type": "display_data"
        },
        {
          "name": "stdout",
          "output_type": "stream",
          "text": [
            "\n",
            "🧠 Agent Insight:\n",
            " The repository contains several Jupyter Notebook files, each seemingly focused on different specialized agents. Here's a breakdown of the key components and structure based on the file names:\n",
            "\n",
            "1. **Fuel_Emission_Agent_Intelligence_Agent.ipynb**:\n",
            "   - This notebook likely focuses on analyzing and possibly predicting fuel emissions. It might include data analysis, machine learning models, or simulations to assess environmental impacts or optimize fuel usage.\n",
            "\n",
            "2. **fixed_Cognitive_Assistant_Agent_Team.ipynb**:\n",
            "   - This file suggests a cognitive assistant, possibly designed to aid in decision-making or provide intelligent recommendations. The \"Team\" aspect might indicate collaborative features or multi-agent interactions.\n",
            "\n",
            "3. **fixed_Crypto_Research_Agent_Intelligence_Agent.ipynb**:\n",
            "   - This notebook is probably dedicated to cryptocurrency research. It might include data analysis, market trend predictions, or sentiment analysis related to cryptocurrencies.\n",
            "\n",
            "4. **fixed_E_commerce_Shopping_Assistant.ipynb**:\n",
            "   - This agent likely serves as a shopping assistant, possibly providing product recommendations, price comparisons, or personalized shopping experiences for e-commerce platforms.\n",
            "\n",
            "5. **fixed_Home_Buying_Real_Estate_Agent.ipynb**:\n",
            "   - This notebook appears to be focused on the real estate market, potentially offering insights into property values, market trends, or personalized home-buying recommendations.\n",
            "\n",
            "6. **fixed_YouTube_Influencer_Intelligence_Agent.ipynb**:\n",
            "   - This file likely deals with analyzing YouTube influencers, possibly providing insights into influencer performance, audience engagement, or content optimization strategies.\n",
            "\n",
            "7. **fixed_voiGno_Restaurant_Agent_PraisonAI.ipynb**:\n",
            "   - This agent seems to be related to the restaurant industry, possibly offering services like menu optimization, customer feedback analysis, or operational efficiency improvements.\n",
            "\n",
            "**Overall Structure and Insights**:\n",
            "- The repository appears to focus on developing intelligent agents across various domains, each tailored to specific industry needs.\n",
            "- The use of Jupyter Notebooks suggests an emphasis on data analysis, visualization, and possibly machine learning or AI model development.\n",
            "- The prefix \"fixed_\" in the file names might indicate that these are refined or updated versions of previous iterations.\n",
            "- The diversity of domains covered (environmental, cognitive, financial, e-commerce, real estate, social media, and hospitality) suggests a broad application of AI and data-driven insights.\n",
            "\n",
            "These notebooks likely contain a mix of data preprocessing, model training, and evaluation, along with visualizations to support the findings and recommendations of each agent.\n"
          ]
        }
      ],
      "source": [
        "repo = input(\"🔗 Enter GitHub repository URL: \")\n",
        "print(\"\\n🧠 Agent Insight:\\n\", ask_agent(repo))"
      ]
    }
  ],
  "metadata": {
    "colab": {
      "provenance": []
    },
    "kernelspec": {
      "display_name": "Python 3",
      "language": "python",
      "name": "python3"
    },
    "language_info": {
      "name": "python",
      "version": "3.11"
    }
  },
  "nbformat": 4,
  "nbformat_minor": 0
}